package com.springcloud.service;

import com.springcloud.common.Friend;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author: 顾志杰
 */
@FeignClient("feign-client")
public interface IService {


    @GetMapping("sayHi")
    public String sayHi();

    @PostMapping("sayHi")
    public Friend sayHiPost(@RequestBody Friend friend);

    @GetMapping("retry")
    public String retry(@RequestParam(name = "timeout") int timeout);

    @GetMapping("error")
    public String error();


    @PostMapping(value = "fileTest",consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public String fileTest(@RequestPart MultipartFile multipartFile);

}
